
<template>
  <h1>登录</h1>
  <h2>登录消息:{{user}}</h2>
  <p>
    用户名:<input type="text" v-model="account" placeholder="请输入用户名..."/>
  </p>
  <p>
    密码:<input type="password" v-model="password" placeholder="请输入密码..." />
  </p>
  <p>
    <button @click="hanlderLogin">登录</button>
  </p>
</template>

<script>

  import {reactive} from "vue";

  export default {
    setup(props,context){
      const user = reactive({
          account : "Mickey",
          password: "940429"
      });

      const hanlderLogin = ()=>{
        console.log("Login....");
      }

      return {
        user,hanlderLogin
      }
    }
  }

</script>
